<!-- <div class="row" id="title">
  <div class="col-sm">
    <h1 translate lib="web">hdrobots</h1>
  </div>
</div> -->

<div class="row">
  <div class="col-md-6">
  </div>
  <div class=" col-md-6 text-right">
    <em class="fas fa-cog fa-spin" ng-show="ctrl.loading==true"></em>
    <!-- <a ng-href="#/Entity/{{ctrl.collection}}" class="btn btn-info" translate lib="web">addentity</a> -->
    <!-- <a ng-href="#/Entity/{{ctrl.collection}}" class="btn btn-info"><em class="az-add-lg"></em></a> -->
  </div>
</div>
<div ng-show="ctrl.errormessage != ''"" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>
<table id="table1" class="table table-striped table-hover table-sm" when-scrolled="ctrl.more()" style="width: 100%;"
aria-label="List of high density robots">
  <thead class="thead-dark">
    <tr>
      <th></th>
      <th scope="col" ng-click="ctrl.ToggleOrder('name')"><strong translate lib="web">name</strong></th>
      <th scope="col" ng-click="ctrl.ToggleOrder('_modified')"><strong translate lib="web">updated</strong></th>
      <th></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="model in ctrl.models">
      <td class="btn-cell">
        <a href ng-click="ctrl.Disable(model)" class="table-btn" ng-show="model.enabled==true"><em
            class="fas fa-toggle-on"></em></a>
        <a href ng-click="ctrl.Enable(model)" class="table-btn" ng-show="model.enabled!=true"><em
            class="fas fa-toggle-off"></em></a>
      </td>
      <td>{{model.name}}</td>
      <td>
        <timesince ng-model="model._modified" />
      </td>
      <td class="btn-cell">
        <a ng-href="#/Entity/{{ctrl.collection}}/{{model._id}}" class="table-btn"><em class="fas fa-edit"></em></a>
      </td>
      <td class="btn-cell">
        <a href ng-click="ctrl.DeleteOne(model)" ng-disabled="ctrl.loading==true" class="table-btn"><em
            class="fas fa-trash"></em></a>
      </td>
    </tr>
  </tbody>
</table>